<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="utf-8">
  <title>参数设置 / 参数设置-编辑</title>
  <link rel="stylesheet" href="../../../css/layui.css" media="all">
  <link rel="stylesheet" type="text/css" href="../../../css/common-layer.css"/>
  <link rel="stylesheet" type="text/css" href="../../../css/common.css"/>
   <style>
  	.layui-form-item{margin-bottom: 10px;margin-left: 30px;}
  	.layui-form-select dl{max-height: 187px;}
  	.layui-form-item .layui-input-inline{width: 220px !important;}
  	.layui-form .layui-form-item {
	    padding: 0 30px 0 0;
			}
			.layui-input {
    width: 220px;}
    label{width: 150px !important;}
  </style>
</head>
<body style="background: #fff;overflow:hidden ;" class="innerBody">
	<div class="tableHtml  layui-form layui-form-pane" style="height: 100%;background: #FFFFFF; padding:0 20px;">
		<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
		  <legend>参数组信息</legend>
		</fieldset>
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">参数组名称</label>
				<div class="layui-input-inline">
					<input name="" class="layui-input" type="text" placeholder="请输入" autocomplete="off">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">参数组描述</label>
				<div class="layui-input-inline">
					<input name="" class="layui-input" type="text" placeholder="请输入" autocomplete="off">
				</div>
			</div>
		</div>
		<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
		  <legend>参数设置</legend>
		</fieldset>
		<div class="layui-form-item">
			<div class="layui-inline">
			  <label class="layui-form-label">是否启用测试模式</label>
			  <div class="layui-input-inline">
					<select name="" lay-filter="parm">
						<option value="0" selected>脱机验证</option>
						<option value="1">联机验证</option>
						
					</select>
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">是否启用设备报警</label>
				<div class="layui-input-inline">
					<input name="" id="yyName" class="layui-input " type="text"  placeholder="请输入" autocomplete="off">
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">
			  <label class="layui-form-label">记录是否允许覆盖</label>
			  <div class="layui-input-inline">
					<select name="" lay-filter="parm">
						<option value="0" selected>允许</option>
						<option value="1">不允许</option>
					</select>
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">开门超时时限</label>
				<div class="layui-input-inline">
					<input name="" id="yyName" class="layui-input " type="text"  placeholder="请输入" autocomplete="off">
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">开门延时时限</label>
				<div class="layui-input-inline">
					<input name="" id="yyName" class="layui-input " type="text"  placeholder="请输入" autocomplete="off">
				</div>
			</div>
			<div class="layui-form-item  window-block-btn" style="padding: 12px 20px 0px 0px;">
			<div class="layui-input-block">
				<button type="button" class="layui-btn layui-btn-primary window-btn" id="canleBtn">取消</button>
				<button type="button" class="layui-btn window-btn" lay-submit="" lay-filter="confirmBtn">提交</button>
			  
			</div>
		</div>
	</div>
</body>
<script src="../../../layui.all.js"></script>
<script src="../../../js/common.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
//主动加载jquery模块
layui.use(['jquery', 'layer','form'], function(){
	var $ = layui.jquery //重点处
	,layer = layui.layer
	,form=layui.form;
	table = layui.table;//表格，注意此处table必须是全局变量
	//得到父页面的id值
	var index = (window.parent.index_);
	var yyName = (window.parent.yyName);
	console.log(yyName);
	$("#yyName").val(yyName);
	//------确认添加分区-------
	form.on('submit(confirmBtn)', function (data) {
	    var obj = data.field;
	    console.log(obj);
	    //以下是ajax
	    
	    /*添加成功之后，关闭弹窗，刷新父页面*/
	    parent.layer.close(index);//关闭layer
	    $('#iframe',parent.document).attr('src', 'html/parm-mgt/parm-mgt/parm-mgt.html');
	});
	//取消,弹窗关闭
	$("body").on("click","#canleBtn",function(){
		parent.layer.close(index);//关闭layer
	})
	
 
});	
   
</script>
</html>